package com.joysuch.wwyt.workflow.repository;

import com.joysuch.wwyt.workflow.entity.WorkFlowTaskHistory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface WorkFlowTaskHistoryDao extends JpaRepository<WorkFlowTaskHistory, Long>{

    public Page<WorkFlowTaskHistory> findAll(Specification<WorkFlowTaskHistory> spec, Pageable pageable);


    WorkFlowTaskHistory findFirstByParentIdOrderByIdDesc(Long parentId);

    List<WorkFlowTaskHistory> findByParentId(Long parentId);

}
